import request from '../baseRequest.js'
const baseURL = '/provide/attestation'
const token = uni.getStorageSync("token")
export function driverAttestation(data){
	let baseDefaultOpts = {
		url: baseURL + '/save',
		// 请求接口地址
		data: data,
		// 传入请求参数
		method: 'post',
		// 配置请求类型
		header: {
			'token':token,
			'X-Requested-With': 'XMLHttpRequest',
			"Accept": "application/json",
			"Content-Type": "application/json; charset=UTF-8"
		},
	}
	return request(baseDefaultOpts)
}
export function showInfo(data){
	let baseDefaultOpts = {
		url: baseURL + '/info',
		// 请求接口地址
		data: data,
		// 传入请求参数
		method: 'get',
		// 配置请求类型
		header: {
			'X-Requested-With': 'XMLHttpRequest',
			"Accept": "application/json",
			"Content-Type": "application/json; charset=UTF-8"
		},
	}
	return request(baseDefaultOpts)
}
export function updateInfo(data){
	let baseDefaultOpts = {
		url: baseURL + '/update',
		// 请求接口地址
		data: data,
		// 传入请求参数
		method: 'post',
		// 配置请求类型
		header: {
			'X-Requested-With': 'XMLHttpRequest',
			"Accept": "application/json",
			"Content-Type": "application/json; charset=UTF-8"
		},
	}
	return request(baseDefaultOpts)
}

export function deleteInfo(data){
	let baseDefaultOpts = {
		url: baseURL + '/delete/'+data,
		// 请求接口地址
		method: 'get',
		// 配置请求类型
		header: {
			'X-Requested-With': 'XMLHttpRequest',
			"Accept": "application/json",
			"Content-Type": "application/json; charset=UTF-8"
		},
	}
	return request(baseDefaultOpts)
}